<?php
/**
 * Survey Object - Shortcut to all only one entry point
 * 
 * @author	Xavier VILAIN
 * @package Nawa\Survey
 * @license
 * 
 */
use Nawa\Survey;
$xview = Xview::instance();
$id = $xview->val('surveyid');
try {
	$survey = Fox\Dao::load(Survey::className(),$id);
	return $survey;
	
} catch(Fox\Object\Exception\NotExist $e) {
	$xview->systemError($e->getMessage());
}